import rxAjax from '@/assets/js/ajax.js';

const SysOpenOfficeApi = {};

SysOpenOfficeApi.baseUrl= '/api-system/system/core/openOffice';

SysOpenOfficeApi.start =function(content) {
    var url= SysOpenOfficeApi.baseUrl + '/startOpenOffice';
    var config={config:content};
    return rxAjax.postJson(url,config);
}

SysOpenOfficeApi.getStatus =function(content) {
    var url= SysOpenOfficeApi.baseUrl + '/getStatus?port='+content;
    return rxAjax.get(url);
}

SysOpenOfficeApi.stopService =function(content) {
    var url= SysOpenOfficeApi.baseUrl + '/stopOpenOffice?port='+content;
    return rxAjax.get(url);
}

SysOpenOfficeApi.getConfig =function() {
    var url= SysOpenOfficeApi.baseUrl + '/getConfig';
    return rxAjax.get(url);
}


SysOpenOfficeApi.publish =function(content) {
    var url= SysOpenOfficeApi.baseUrl + '/publish';
    var config={config:content};
    return rxAjax.postJson(url,config);
}



export  default SysOpenOfficeApi;
